package com.miao.websecurity.entity.vo;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @author MiaoWenqing
 * @description: 重置密码
 * @date 2021/2/4 11:38
 */
public class ResetPasswordVO {

    private String tel;
    private String newPwd;
    private String code;


    @Override
    public String toString() {
        return "resetPasswordVO{" +
                "tel='" + tel + '\'' +
                ", newPwd='" + newPwd + '\'' +
                ", code='" + code + '\'' +
                '}';
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getNewPwd() {
        return newPwd;
    }

    public void setNewPwd(String newPwd) {
        this.newPwd = new BCryptPasswordEncoder().encode(newPwd);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public ResetPasswordVO() {
    }
}
